#include <stdio.h>

int main()
{
	int num = 0;
	int n = 0;
	scanf_s("%d %d", &num, &n);
	int key = 0;
	int sum = 0;
	for (int i = 0; i < n; i++)
	{
		key = 10 * key + num;
		sum += key;
	}
	printf("%d\n", sum);
	
	return 0;
}